  p u b l i c   c l a s s   S c r o l l B a r T e s t   e x t e n d s   j a v a x . s w i n g . J F r a m e   { 
 
 / * *   C r e a t e s   n e w   f o r m   S c r o l l B a r T e s t   * / 
 
 p u b l i c   S c r o l l B a r T e s t ( )   { 
 
 i n i t C o m p o n e n t s ( ) ;   
 
 } 
 
 p r i v a t e   v o i d   i n i t C o m p o n e n t s ( )   { / / G E N - B E G I N : i n i t C o m p o n e n t s 
 
 j T e x t A r e a 1   =   n e w   j a v a x . s w i n g . J T e x t A r e a ( " T e s t " , 1 0 , 1 0 ) ; 
 
 / / j T e x t A r e a 1 . s e t 
 
 j S c r o l l P a n e 1   =   n e w   j a v a x . s w i n g . J S c r o l l P a n e ( j T e x t A r e a 1 ) ; 
 
 b u t t o n   =   n e w   j a v a x . s w i n g . J B u t t o n ( " T e s t B u t t o n " ) ; 
 
 a d d W i n d o w L i s t e n e r ( n e w   j a v a . a w t . e v e n t . W i n d o w A d a p t e r ( )   { 
 
 p u b l i c   v o i d   w i n d o w C l o s i n g ( j a v a . a w t . e v e n t . W i n d o w E v e n t   e v t )   { 
 
 e x i t F o r m ( e v t ) ; 
 
 } 
 
 } ) ; 
 
 g e t C o n t e n t P a n e ( ) . a d d ( j S c r o l l P a n e 1 ,   j a v a . a w t . B o r d e r L a y o u t . C E N T E R ) ; 
 
 g e t C o n t e n t P a n e ( ) . a d d ( b u t t o n ,   j a v a . a w t . B o r d e r L a y o u t . S O U T H ) ; 
 
 j a v a . a w t . D i m e n s i o n   s c r e e n S i z e   =   j a v a . a w t . T o o l k i t . g e t D e f a u l t T o o l k i t ( ) . g e t S c r e e n S i z e ( ) ; 
 
 s e t S i z e ( n e w   j a v a . a w t . D i m e n s i o n ( 2 0 0 ,   1 5 0 ) ) ; 
 
 s e t L o c a t i o n ( ( s c r e e n S i z e . w i d t h - 1 5 0 ) / 2 , ( s c r e e n S i z e . h e i g h t - 1 0 0 ) / 2 ) ; 
 
 } / / G E N - E N D : i n i t C o m p o n e n t s 
 
 / * *   E x i t   t h e   A p p l i c a t i o n   * / 
 
 p r i v a t e   v o i d   e x i t F o r m ( j a v a . a w t . e v e n t . W i n d o w E v e n t   e v t )   { / / G E N - F I R S T : e v e n t _ e x i t F o r m 
 
 S y s t e m . e x i t ( 0 ) ; 
 
 } / / G E N - L A S T : e v e n t _ e x i t F o r m 
 
 / * * 
 
 *   @ p a r a m   a r g s   t h e   c o m m a n d   l i n e   a r g u m e n t s 
 
 * / 
 
 p u b l i c   s t a t i c   v o i d   m a i n ( S t r i n g   a r g s [ ] )   { 
 
 t r y { 
 
 j a v a x . s w i n g . U I M a n a g e r . p u t ( " S c r o l l B a r . t h u m b " ,   n e w   j a v a x . s w i n g . p l a f . C o l o r U I R e s o u r c e ( 3 3 , 1 2 9 , 1 7 6 ) ) ; 
 
 j a v a x . s w i n g . U I M a n a g e r . p u t ( " B u t t o n . f o r e g r o u n d " ,   n e w   j a v a x . s w i n g . p l a f . C o l o r U I R e s o u r c e ( 0 , 0 , 0 ) ) ; 
 
 } c a t c h ( E x c e p t i o n   e ) { 
 
 e . p r i n t S t a c k T r a c e ( ) ; 
 
 } 
 
 S c r o l l B a r T e s t   t e s t   =   n e w   S c r o l l B a r T e s t ( ) ; 
 
 t e s t . s h o w ( ) ; 
 
 } 
 
 
 
 / /   V a r i a b l e s   d e c l a r a t i o n   -   d o   n o t   m o d i f y / / G E N - B E G I N : v a r i a b l e s 
 
 p r i v a t e   j a v a x . s w i n g . J S c r o l l P a n e   j S c r o l l P a n e 1 ; 
 
 p r i v a t e   j a v a x . s w i n g . J T e x t A r e a   j T e x t A r e a 1 ; 
 
 p r i v a t e   j a v a x . s w i n g . J B u t t o n   b u t t o n ; 
 
 / /   E n d   o f   v a r i a b l e s   d e c l a r a t i o n / / G E N - E N D : v a r i a b l e s 
 
 }     